<template>
    <div class="school">
        <h2>学校名称：{{ name }}</h2>
        <h2>学校地址{{ address }}</h2>
    </div>
</template>

<script>
export default {
    name: "StudentInfo",
    data() {
        return {
            name: "往生堂",
            address: "璃月",
        };
    },
    mounted() {
        // console.log("School", this.x);
        this.$bus.$on("hello", (data) => console.log("我是School", data));
    },
    beforeDestroy() {
        this.$bus.$off("hello");
    },
};
</script>

<style scoped>
.school {
    padding: 5px;
    background-color: rgb(143, 200, 253);
    margin-bottom: 20px;
}
</style>